#define  _CRT_SECURE_NO_WARNINGS 1

#include "list.h"

void test_list1()
{
	zzh::list<int> lt;

	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);
	lt.push_back(5);
	lt.push_back(6);
	lt.push_back(7);
	lt.push_back(8);
	size_t k = 3;

	zzh::list<int>::iterator p = lt.begin();
	while (k--)
	{
		++p;
	}
	lt.insert(p, 600);

	zzh::list<int>::iterator it = lt.begin();
	while (it != lt.end())
	{
		*it *= 2;
		cout << *it << " ";
		++it;
	}
	cout << endl;

	/*int m = 0;
	cin >> m;
	auto pos = find(lt.begin(), lt.end(), m);
	lt.insert(pos, 400);*/

	for (auto k : lt)
	{
		cout << k << " ";
	}
	cout << endl;

	/*cin >> m;
	pos = find(lt.begin(), lt.end(), m);
	lt.insert(pos, 400);

	for (auto k : lt)
	{
		cout << k << " ";
	}
	cout << endl;

	cin >> m;
	pos = find(lt.begin(), lt.end(), m);
	lt.insert(pos, 400);

	for (auto k : lt)
	{
		cout << k << " ";
	}
	cout << endl;*/
}

int main()
{
	test_list1();

	return 0;
}